import { defineStore } from 'pinia'
interface BaseConifg {
  theme: 'light' | 'dark'
  collapse: boolean
  siderWidth: number
  headerHeight: number
  systemVisible: boolean
}

export const useConfigStore = defineStore(
  'config',
  () => {
    const globalConfig = ref<BaseConifg>({
      theme: 'light',
      collapse: false,
      siderWidth: 230,
      headerHeight: 64,
      systemVisible: false
    })
    return { globalConfig }
  },
  {
    persist: true
  }
)

export default useConfigStore
